package com.rong.raft.rpc;

import java.rmi.Remote;
import java.rmi.RemoteException;

import com.rong.raft.rpc.protocol.HeartbeatRequest;
import com.rong.raft.rpc.protocol.VoteRequest;
import com.rong.raft.rpc.protocol.VoteResponse;

/**
 * 
 * @desc Rpc服务
 *
 * @author liurong
 *
 * @date 2019年10月22日
 */
public interface IRpcService extends Remote {

	/**
	 * 发送投票
	 * 
	 * @param voteRequest
	 * @return
	 * @throws RemoteException
	 */
	VoteResponse sendVote(VoteRequest voteRequest) throws RemoteException;

	/**
	 * 发送心跳
	 * 
	 * @param heartbeatRequest
	 * @throws RemoteException
	 */
	void sendHeartBeat(HeartbeatRequest heartbeatRequest) throws RemoteException;
}
